package com.ruoyi.mall.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品属性对象 pms_attribute
 *
 * @author zyy
 * @date 2023-09-17
 */
public class PmsAttribute extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 记录id
     */
    private Long id;

    /**
     * 所属属性模版id
     */
    @Excel(name = "所属属性模版id")
    private Long templateId;

    /**
     * 属性名称
     */
    @Excel(name = "属性名称")
    private String name;

    /**
     * 简介（某些属性名称可能相同，通过简介补充描述）
     */
    @Excel(name = "简介", readConverterExp = "某=些属性名称可能相同，通过简介补充描述")
    private String description;

    /**
     * 属性类型，1=销售属性，0=非销售属性
     */
    @Excel(name = "属性类型，1=销售属性，0=非销售属性")
    private Integer type;

    /**
     * 输入类型，0=手动录入，1=单选，2=多选，3=单选（下拉列表），4=多选（下拉列表）
     */
    @Excel(name = "输入类型，0=手动录入，1=单选，2=多选，3=单选", readConverterExp = "下=拉列表")
    private Integer inputType;

    /**
     * 备选值列表
     */
    @Excel(name = "备选值列表")
    private String valueList;

    /**
     * 计量单位
     */
    @Excel(name = "计量单位")
    private String unit;

    /**
     * 自定义排序序号
     */
    @Excel(name = "自定义排序序号")
    private Integer sort;

    /**
     * 是否允许自定义，1=允许，0=禁止
     */
    @Excel(name = "是否允许自定义，1=允许，0=禁止")
    private Integer isAllowCustomize;

    /**
     * 数据创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "数据创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtCreate;

    /**
     * 数据最后修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "数据最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtModified;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setTemplateId(Long templateId) {
        this.templateId = templateId;
    }

    public Long getTemplateId() {
        return templateId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public void setInputType(Integer inputType) {
        this.inputType = inputType;
    }

    public Integer getInputType() {
        return inputType;
    }

    public void setValueList(String valueList) {
        this.valueList = valueList;
    }

    public String getValueList() {
        return valueList;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getUnit() {
        return unit;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getSort() {
        return sort;
    }

    public void setIsAllowCustomize(Integer isAllowCustomize) {
        this.isAllowCustomize = isAllowCustomize;
    }

    public Integer getIsAllowCustomize() {
        return isAllowCustomize;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("templateId", getTemplateId())
                .append("name", getName())
                .append("description", getDescription())
                .append("type", getType())
                .append("inputType", getInputType())
                .append("valueList", getValueList())
                .append("unit", getUnit())
                .append("sort", getSort())
                .append("isAllowCustomize", getIsAllowCustomize())
                .append("gmtCreate", getGmtCreate())
                .append("gmtModified", getGmtModified())
                .toString();
    }
}
